<?php
require_once realpath(dirname(__FILE__) . '//..//..//pages.php');
require_once CLASS_TAG;

/**
 * This class represents a tag that doesn't need to be closed.
 *
 * @author Andrea Cantafio
 */
class EmptyTag extends Tag {
    
    /**
     * Creates a new empty tag.
     * 
     * @param string $name name of this tag.
     * @param array $attributes [Optional]containing the attributes that will be applied to this tag.
     * The array must contain as keys the name of the attributes, pointing to their values.
     */
    public function __construct ($name, $attributes = null, $outerHTML = null) {
        parent::__construct ($name, $attributes, $outerHTML);
    }
    
    /**
     * This method returns a representation of this tag.
     * 
     * @return string  
     */
    public function __toString () {
        return parent::__toString () . '/>';
    }
}

?>
